<!DOCTYPE html>
<html lang="zh-cmn-Hans">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<title>鹿程智慧油站商户平台</title>
		<meta name="description" content="鹿程科技是提供加油站互联网化零管系统、营销及支付和大数据分析运营服务的行业领先科技公司。鹿程科技充分了解加油站行业的需求和新兴互联网的发展,依靠业内最先进的科技和标准化的运营,持续帮助油站业务发展创造价值。"/>
		<meta name="keywords" content="智慧油站,鹿程,鹿程智慧油站,鹿程智慧油站微信支付,加油站微信支付,加油站营销管理"/>
		<link rel="icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
		<link rel="shortcut icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
		<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
		<link rel="stylesheet" href="../layui/css/layui.css" />
		<link rel="stylesheet" href="../css/style.css" />
	</head>
<body>
		<!--deer-content-->
		<div class="deer-content" style="border-bottom: none;">
			<div class="ware-add">
				<form action="#" class="layui-form car-info">
					<div class="car-info-phone">
						<dl>
						    <dt>车队名称：</dt>
						    <dd><input type="text" name="car_name" placeholder="请输入车队名称" style="width: 300px;" class="layui-input"></dd>
					    </dl>
					    <dl><span class="car-binding">绑定管理员</span></dl>
					</div>
			    	<div class="car-info-phone">
			    		<dl>
			    			<dt>车队队长：</dt>
			    			<dd><input type="text" name="car_people" placeholder="请输入姓名" class="layui-input"></dd>
				   		 </dl>
					    <dl>
						    <dt>联系电话：</dt>
						    <dd><input type="text" name="car_phone" placeholder="请输入手机号码" class="layui-input"></dd>
					    </dl>
					    <dl>
						    <dt>卡片卡号：</dt>
						    <dd><input type="text" name="car_number" placeholder="请输入卡号" class="layui-input"></dd>
					    </dl>
			    	</div>
			    	<div class="car-info-phone">
			    		<dl><span>车队会员</span></dl>
			    	</div>
			    	<div class="car-info-phone">
			    		<dl><span id="carADD">增加一行</span></dl>
			    		<dl><span id="carDel">删除最后一行</span></dl>
			    	</div>
			    	<div class="car-info-phone car-phone">
			    		<dl>
			    			<dt>姓名：</dt>
			    			<dd><input type="text" name="car_people[]" placeholder="请输入姓名" class="layui-input"></dd>
				   		 </dl>
					    <dl>
						    <dt>联系方式：</dt>
						    <dd><input type="text" name="car_phone[]" placeholder="请输入手机号码" class="layui-input"></dd>
					    </dl>
					    <dl>
						    <dt>卡片卡号：</dt>
						    <dd><input type="text" name="car_numberp[]" placeholder="请输入卡号" class="layui-input"></dd>
					    </dl>
			    	</div>
					<button class="submit" lay-submit lay-filter="Submit" >确认修改</button>
				</form>
			</div>
		</div>
		<!--/deer-content-->
	
	<!--js-->
	<aside>
		
		<script type="text/javascript" src="../layui/layui.js" ></script>
		<script type="text/javascript">
			
			layui.use(['form','jquery','upload'],function(){
				var	form=layui.form;
				var $=layui.jquery;
				var upload=layui.upload
				
				
				//表单提交
				form.on('submit(Submit)', function(data){
					console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
					
					$.ajax({
			            url: '/',
			            data: data.field,
			            type: 'post',
			            datatype: 'json',
			            success: function (res) {
				                if (res.code == 1) {
				                	
				                	layer.msg(res.msg);
				                    return;
				                }
				            }
				        });
					return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
				});
				//add
				$('#carADD').bind('click',function(){
					var carHtml=$('.car-phone').eq(0).prop("outerHTML")
					var carAdd=$('.car-phone').eq(-1)
					carAdd.after(carHtml)
				})
				//del
				$('#carDel').bind('click',function(){
					var len=$('.car-phone').length
					if($('.car-phone').length>1){
						$('.car-phone').eq(-1).remove()
					}else{
						layer.msg('默认设置不可删除',{icon:4})
					}
				})
				//car-binding
				$('.car-binding').bind('click',function(){
				 parent.layer.open({
						type:2,
						area: '380px',
						offset:'200px',
						shadeClose:true,
						title:'绑定管理员',
						content:'车队管理-创建车队-绑定管理员.html',
					})
				})
				
				
				
				
			})
			
		</script>
		
		
		
	</aside>
	<!--/js-->
</body>
</html>